import signin from '@/components/Sign'
var Sign = {};
Sign.install = function(Vue, options) {
    const SignBoxInstance = Vue.extend(signin);
    let SignBox;
    const init = ()=>{
        SignBox = new SignBoxInstance();
        let signEl = SignBox.$mount().$el;
        // 3、把创建的实例添加到body中
        document.body.appendChild(signEl);
    }
    // 使用options的配置
    /*for(let i in options) {
        opt[i] = options[i]
    }*/
    Vue.prototype.$sign = (type=0,success)=>{
        if(!SignBox){
            init();
        }
        SignBox.isShow = true;
        SignBox.signType = type;
        SignBox.success = success;
    };
    
};

export default Sign;